<template>
  <div>
    <detail v-if="$route.query.area=='infoview'"></detail>
    <list  v-else-if="$route.query.area=='infolist'"></list>
    <screen  v-else-if="$route.query.area=='cockpit'"></screen>
  </div>
</template>
<script>
import detail from './infoview-detail.vue'
import list from './infoview-list.vue'
import screen from '../analysis/screen.vue'
export default {
  extends: elmVueBase,
  components:{detail,list,screen},
  data() {
    return {
      model: {},
      module_name:null
    }
  },
  async created() {
    this.getData();
  },
  methods: {
    async getData() {
      if(this.$route.query.news!=undefined) {
        this.module_name="biz_cms_news_files";
        this.model = await elm.post("/business/my/GetNews", {id: this.$route.query.news})
      }
      else if(this.$route.query.notice!=undefined) {
        this.module_name="biz_cms_notice_files";
        this.model = await elm.post("/business/my/GetNotice", {id: this.$route.query.notice})
      }
    }
  }
}
</script>